using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

namespace Main.controls
{
    public partial class CreateComment : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack && comment.Value != "")
            {
                
                MakeComment();
            }
        }

        public void MakeComment()
        {
            int pollID = Convert.ToInt32(Request.QueryString["id"]);
            DataAccess.CreateComment((Guid)Membership.GetUser().ProviderUserKey, pollID, Request["comment"], Request["commenttitle"]);
            //Response.Write(comment.Value);
            //Response.Write(comment.InnerHtml);
            //Response.Write(comment.InnerText);
        }
    }
}